package org.zhengquan.util;

import com.google.common.base.Splitter;

import java.util.List;
import java.util.stream.Collectors;

/**
 * @author zhengquan
 * @date 2017/11/5
 */
public class StringUtil {

    public static List<Integer> splitToListInt(String str) {
        List<String> stringList = Splitter.on(",").trimResults().omitEmptyStrings().splitToList(str);
        return stringList.stream().map(strItem -> Integer.valueOf(strItem)).collect(Collectors.toList());

    }
}
